#ifndef DETECTION_MANAGER_HPP
#define DETECTION_MANAGER_HPP

#include "detector_base.hpp"
#include <memory>
#include <string>
#include <map>

namespace center_detection{

    class DetectionManager{

        public:

        DetectionManager() = default;
        ~DetectionManager() = default;

        void registerDetector(const std::string& name, std::shared_ptr<DetectorBase> detector);
        
        std::shared_ptr<DetectorBase> getDetector(const std::string& name);

        bool detect(const std::string& detector_name, 
                    DetectorBase::PointCloud cloud,
                    geometry_msgs::msg::PointStamped& center_point);

        private:

        std::map<std::string, std::shared_ptr<DetectorBase>> detectors_;
    };
}

#endif
//检测管理器